package pkg

import (
	"encoding/json"
	"fmt"
	"github.com/Baidu-AIP/golang-sdk/aip/censor"
)

func TestingStringV2(title, url string) bool {

	client := censor.NewClient("KvxJKNxqhOxhRW4eFunZDN2z", "BD9SQDATquPFdBoJESuZU7DlIBgJupRZ")
	res := client.VideoCensor(title, url, "", nil)

	var resData map[string]interface{}
	fmt.Println(res)

	json.Unmarshal([]byte(res), &resData)
	fmt.Println(resData)

	if resData["conclusion"] == "不合规" {
		fmt.Println("不合规")
		return false
	}
	return true
}
